<template>
  <div class="page-common">
    <div v-for="item in learnList" :key="item.title" class="box-card mb12">
      <el-card class="link" @click="handleClick(item.url)">
        <template #header>
          <div class="card-header">
            <span class="fwb">{{ item.title }}</span>
            <span>{{ item.date }}</span>
          </div>
        </template>
        <div>点击查看详细内容</div>
      </el-card>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, computed } from 'vue'
import { useStore } from 'vuex'
import { learnList } from './index'

const store = useStore()
const handleClick = (url: string) => {
    window.open(url, '_blank')
}
</script>

<style lang="less" scoped>
.page-common {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  .box-card {
    width: calc(50% - 10px);
    .card-header {
      display: flex;
      justify-content: space-between;
    }
  }
  .el-card:hover {
    background-color: @main-color !important;
  }
}
</style>
